package com.tyl.pojo;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.PropertySource;
import org.springframework.stereotype.Component;

import java.util.Date;
import java.util.List;
import java.util.Map;

@Data
@AllArgsConstructor
@NoArgsConstructor
@Component
@PropertySource(value="classpath:person.properties")//指定配置文件
@ConfigurationProperties(prefix ="person")//配置绑定支持多数据
public class Person {
    // @Value("${person.lastName}")//配置绑定只能单一绑定
    private String lastName;
    // @Value("${person.age}")
    private Integer age;
    private Boolean boss;
    private Date birth;
    private Map<String, Object> maps;
    private List<Object> lists;
    private Dog dog;
}
